<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:ace="http://www.icefaces.org/icefaces/components"
                xmlns:ice="http://www.icesoft.com/icefaces/component"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/resources/templates/main-template.xhtml">

    <ui:define name="example">

        <h:form>
            <h:commandButton value="Regenerate"
                             actionListener="#{tree.refreshTree}"/>
            <br/>

            <ice:tree value="#{tree.model}"
                      var="node"
                      hideRootNode="false"
                      hideNavigation="false">
                <ice:treeNode>
                    <f:facet name="icon">
                        <h:graphicImage value="#{node.userObject.icon}" alt="#{node.userObject.tooltip}"/>
                    </f:facet>
                    <f:facet name="content">
                        #{node.userObject.text}
                    </f:facet>
                </ice:treeNode>
            </ice:tree>
        </h:form>
    </ui:define>
</ui:composition>